package sortTest;

public class RecursionDemo {
    public static void main(String[] args) {
        //递归 : 自己调用自己
        System.out.println(getSum(100));


    }

    public static int getSum(int number) {
        if (number == 1) {
            return 1;
        }
        return number + getSum(number - 1);
    }
}
